#ifndef GAMEBASESTATE_H
#define GAMEBASESTATE_H

#include "BaseState.h"

#include "PenjinTypes.h"
#include "Text.h"
#include "Menu.h"

class GameBaseState : public BaseState
{
    public:
        GameBaseState();
        virtual ~GameBaseState();

        /// pause
        virtual void pauseScreen();
        virtual void pauseUpdate();     // Update to run when paused
        virtual void onPause()=0;       // Do stuff when just paused
        virtual void onResume()=0;      // Do stuff when unpausing

        /// input
		virtual void userInput();	    // Take user input
		virtual void pauseInput();      // Take user input on pauseScreen

        /// general
		virtual void update()=0;
		virtual void render()=0;

        /// variables
        int score;                      // Use this for scoring in the level, it will get passed to the global score on end
        int lives;                      // The number of remaining lives, will get set on creation and returned to the global state on exit (win/lose)

        /// state information (used in the framework)
        uint stateID;
    protected:
		/// framework
		void winGame();                 // Triggers an immediate state change, so it should be called after a fade out has been played
		bool checkLives(CRint numLives);// Checks the number of lives and returns true if game can continnue and false on game-over (call after player loses a life) - just to ensure a consistent way of checking
		void loseGame();                // Triggers an immediate state change, so it should be called after a fade out has been played
    private:
        /// pause menu vars
        Text pauseText;
        Menu pauseMenu;
};

#endif
